# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Thomas S Hatch <thatch45@gmail.com>

pkgname=python-cram
pkgver=0.7
pkgrel=10
pkgdesc='Functional tests for command line applications'
arch=('any')
url='https://bitheap.org/cram/'
license=('GPL')
depends=('python')
source=("https://bitheap.org/cram/cram-$pkgver.tar.gz")
sha512sums=('9fa57e504abac8fd15bf5ff4a74405cb7acd10fd4c797adee87052a4f1c4e975bbc0f4219afd9485358b2c2939b48b3ffe538ae2abc6eea71e0ba8b458d50103')

build() {
  cd "$srcdir"/cram-$pkgver
  python setup.py build
}

check() {
  cd "$srcdir"/cram-$pkgver
  PYTHONPATH="$PWD/build/lib:$PYTHONPATH" PYTHON=python python scripts/cram tests
}

package() {
  cd cram-$pkgver
  python setup.py install --root="$pkgdir" -O1
}
